<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>Vue:组件全局注册</title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<style>

		</style>
	</head>
	<body>
		<div id="msg">
			<button-component></button-component>
			<button-component></button-component>
		</div>
		<script type="text/javascript">
			Vue.component('button-component', {
				data:function(){
					return {
						count: 0
					}
				},
				template: '<button>{{count}}</button>'
			})
			
			var app = new Vue({
				el: '#msg'
			});
		</script>
	</body>
</html>
